﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Odds.DataAccess;
using Odds.Entity;

public partial class Football_14Game_IssueItemList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Guid issueID = Guid.Empty;

        if (Request.QueryString["issueID"] != null &&
           Guid.TryParse(Request.QueryString["issueID"].ToString(), out issueID))
        {
            BindRpt(issueID);
        }
    }

    private void BindRpt(Guid issueID)
    {
        List<Fun_GetOddsIssueItemoOddsValueByIssueIDResult> oddsValueSet =
            new OddsValueController().GetOddsIssueItemoOddsValueByIssue(issueID)
            .OrderBy(o => o.IndexInIssue).ThenBy(o => o.CompanyName).ThenBy(o => o.IndexInIssueItem).ToList();

        if (oddsValueSet.Count > 0)
        {
            tdIssueNumber.InnerText = string.Format("胜负彩{0}期欧洲四大博彩公司赔率", oddsValueSet[0].IssueRealID.ToString());
            rpt.DataSource = oddsValueSet;
            rpt.DataBind();
        }
        else
        {
            tdIssueNumber.InnerText = string.Format("没有您要找的数据！", oddsValueSet[0].IssueRealID.ToString());
        }
    }
}